function Menu(contextPath,divContainer){
	View.apply(this,arguments);
	this.beforeRefresh = function(){
		this.divContainer.className = "xmenu";
		return buildMenu(this.getDataArray(),this.divContainer);
	};
	var buildMenu = function(dataArray,divContainer){
		var length = dataArray.length;
		var htmlArray = ['<ul>'];
		var groupFlag = null;
		for(var i=0;i<length;i++){
			if(groupFlag!==null&&dataArray[i]["GROUPING"]!=groupFlag){
				htmlArray.push('<li class="separator">&nbsp;</li>');
			}
			var menuName = dataArray[i].NAME;
			if(menuName&&menuName.indexOf(".")>-1){
				var nameArray = menuName.split(".");
				htmlArray.push('<li class="menuitem'+nameArray.pop()+'"');
			}else{
				htmlArray.push('<li class="menuitem"');
			}
			for(var ele in dataArray[i]){
				htmlArray.push(' '+ele+'="'+dataArray[i][ele]+'"');
			}
			htmlArray.push('>'+dataArray[i].NAMETEXT+'</li>');
			groupFlag = dataArray[i]["GROUPING"]||"";
		}
		htmlArray.push('</ul>');
		return htmlArray.join('');
	};
}

Menu.prototype = new View();

Menu.prototype.handleClickEvent0 = function(evt){
	var handleObject = evt.srcElement;
	if(handleObject.tagName=="LI"&&window["Comm"].trim(handleObject.innerText).length>0){
		this.divContainer.style.display = "none";
	}
};
Menu.prototype.handleMouseOverEvent0 = function(evt){
	var handleObject = evt.srcElement;
	if(handleObject.tagName=="LI"&&window["Comm"].trim(handleObject.innerText).length>0){
		handleObject.style.color = "white";
		handleObject.style.backgroundColor = "darkblue";
	}
};
Menu.prototype.handleMouseOutEvent0 = function(evt){
	var handleObject = evt.srcElement;
	if(handleObject.tagName=="LI"&&window["Comm"].trim(handleObject.innerText).length>0){
		handleObject.style.color = "black";
		handleObject.style.backgroundColor = "#f9f8f7";
	}
};